from ddddocr import DdddOcr


class PicTure:

    def __init__(self, file):
        self.file = file
        self.code = DdddOcr()

    def read(self):
        f = open(self.file, "rb")
        img = f.read()
        code_new = self.code.classification(img)
        f.close()
        return code_new
